package com.itheima.domain;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

/**
 * @Author: yangshuai
 * @Desc: 菜品-数据传输对象：接收菜品新增前端的请求
 * @Date: 2022-06-05 14:22:56
 */
@Data
public class DishDTO implements Serializable {

		/**
		 * 菜品和口味关联数据，一个菜品可以包含多种口味
		 */
		private List<DishFlavor> flavors = new ArrayList<>();

		private Long id;

		//菜品名称
		private String name;


		//菜品分类id
		private Long categoryId;

		//菜品价格
		private BigDecimal price;


		//商品码
		private String code;


		//图片
		private String image;


		//描述信息
		private String description;


		//0 停售 1 起售
		private Integer status;


		//顺序
		private Integer sort;


		@TableField(fill = FieldFill.INSERT)
		private LocalDateTime createTime;


		@TableField(fill = FieldFill.INSERT_UPDATE)
		private LocalDateTime updateTime;


		@TableField(fill = FieldFill.INSERT)
		private Long createUser;


		@TableField(fill = FieldFill.INSERT_UPDATE)
		private Long updateUser;

		@TableLogic
		private Integer isDeleted;
}
